package com.demo.thread.create;

import java.util.concurrent.Callable;

/**
 * @author : YU.TAN
 * @date : 2021/11/1 13:46
 */
public class ThreadThree implements Callable<String> {
    private String s;
    public ThreadThree(String s) {
        this.s = s;
    }

    @Override
    public String call() throws Exception {
        System.out.println(s);
        return s;
    }

    public static void main(String[] args) throws Exception {
        ThreadThree threadThreeA = new ThreadThree("1");
        ThreadThree threadThreeB = new ThreadThree("2");
        ThreadThree threadThreeC = new ThreadThree("3");
        ThreadThree threadThreeD = new ThreadThree("4");

        String a = threadThreeA.call();
        String b = threadThreeB.call();
        String c = threadThreeC.call();
        String d = threadThreeD.call();
    }
}
